package com.dm.client.dm_order;

import com.dm.config.DmConfiguration;
import com.dm.fallback.dm_order.DmOrderClientFallBack;
import com.dm.pojo.dm_order.DmOrder;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
* Created by shang-pc on 2018/5/15.
*/
@FeignClient(name = "dm-order-provider", configuration = DmConfiguration.class, fallback = DmOrderClientFallBack.class)
public interface RestDmOrderClient {

    @RequestMapping(value = "/getDmOrderById",method = RequestMethod.POST)
    public DmOrder getDmOrderById(@RequestParam("id") Long id)throws Exception;

    @RequestMapping(value = "/getDmOrderListByMap",method = RequestMethod.POST)
    public List<DmOrder>	getDmOrderListByMap(@RequestParam Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getDmOrderCountByMap",method = RequestMethod.POST)
    public Integer getDmOrderCountByMap(@RequestParam Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/qdtxAddDmOrder",method = RequestMethod.POST)
    public Integer qdtxAddDmOrder(@RequestBody DmOrder dmOrder)throws Exception;

    @RequestMapping(value = "/qdtxModifyDmOrder",method = RequestMethod.POST)
    public Integer qdtxModifyDmOrder(@RequestBody DmOrder dmOrder)throws Exception;

    @RequestMapping(value = "/deleteDmOrderById", method = RequestMethod.POST)
    public Long deleteDmOrderById(@RequestParam("id") Long id) throws Exception;
}
